<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>

<body>
  <div>
    <button onclick="fn()">下载文件</button>
    <iframe name="iframeId" style="display:none"></iframe>

    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


  </div>


  <script>
    function fn() {
      console.log(111);
      window.open('/download/01.jpg', 'iframeId');
    }
  </script>
</body>

</html>